package com.lcb.rabbitmq.entity;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/****
 * @Author:lcb
 * @Description:MsgLog构建
 * @Date: 2021-01-27 10:00:03
 *****/
@Table(name = "msg_log")
public class MsgLog implements Serializable {

    @Id
    @Column(name = "`msg_id`")
    private String msgId;//消息唯一标识

    @Column(name = "`msg`")
    private String msg;//消息体, json格式化

    @Column(name = "`exchange`")
    private String exchange;//交换机

    @Column(name = "`routing_key`")
    private String routingKey;//路由键

    @Column(name = "`status`")
    private Integer status;//状态: 0投递中 1投递成功 2投递失败 3已消费

    @Column(name = "`try_count`")
    private Integer tryCount;//重试次数

    @Column(name = "`next_try_time`")
    private Date nextTryTime;//下一次重试时间

    @Column(name = "`create_time`")
    private Date createTime;//创建时间

    @Column(name = "`update_time`")
    private Date updateTime;//更新时间


    //get方法
    public String getMsgId() {
        return msgId;
    }

    //set方法
    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    //get方法
    public String getMsg() {
        return msg;
    }

    //set方法
    public void setMsg(String msg) {
        this.msg = msg;
    }

    //get方法
    public String getExchange() {
        return exchange;
    }

    //set方法
    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    //get方法
    public String getRoutingKey() {
        return routingKey;
    }

    //set方法
    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }

    //get方法
    public Integer getStatus() {
        return status;
    }

    //set方法
    public void setStatus(Integer status) {
        this.status = status;
    }

    //get方法
    public Integer getTryCount() {
        return tryCount;
    }

    //set方法
    public void setTryCount(Integer tryCount) {
        this.tryCount = tryCount;
    }

    //get方法
    public Date getNextTryTime() {
        return nextTryTime;
    }

    //set方法
    public void setNextTryTime(Date nextTryTime) {
        this.nextTryTime = nextTryTime;
    }

    //get方法
    public Date getCreateTime() {
        return createTime;
    }

    //set方法
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    //get方法
    public Date getUpdateTime() {
        return updateTime;
    }

    //set方法
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }


}
